﻿using Himp.Outpatient;
using Microsoft.Extensions.DependencyInjection;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
using Volo.Abp.DependencyInjection;

namespace Himp.Platform
{
    public class OtpOrdsQuery : ISingletonDependency
    {
        private readonly IServiceProvider _serviceProvider;

        public OtpOrdsQuery(IServiceProvider serviceProvider)
        {
            _serviceProvider = serviceProvider;
        }

        public async Task<PagedResultDto<OtpPayWayDto>> GetOtpPayWayListAsync(OtpPayWayInput input)
        {
            var otpPayWayService = _serviceProvider.GetService<IOtpPayWayService>();

            return await otpPayWayService.GetListAsync(input);
        }

        public async Task<OtpOrdRecDto> GetOtpOrdRecAsync(Guid id)
        {
            var otpOrdRecService = _serviceProvider.GetService<IOtpOrdRecService>();

            return await otpOrdRecService.GetAsync(id);
        }

        public async Task<PagedResultDto<OtpOrdRecDto>> GetOtpOrdRecListAsync(OtpOrdRecInput input)
        {
            var otpOrdRecService = _serviceProvider.GetService<IOtpOrdRecService>();

            return await otpOrdRecService.GetListAsync(input);
        }
    }
}
